/**
 *  Copyright 2009-2010 Steven Ottenhoff (Dual-IT)
 * 
 *  This file is part of Clazzified.
 *
 *  Clazzified is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Clazzified is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Clazzified.  If not, see http://www.gnu.org/licenses/gpl.
 * 
 */

package nl.dualit.clazzified.core.model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ClazzTestData {

	private Map<String,String> testClazz;
	private List<Map<String,String>> testAttributes = new ArrayList<Map<String,String>>();
	private List<Map<String,String>> testRelations;
	private Map<String,String> testManipulations;
	
	public static List<ClazzTestData> getTestData( int clazzCount, int attributeCount, 
			int relationCount, int manipulationCount ){
		
		List<ClazzTestData> data = new ArrayList<ClazzTestData>();
		
		for( int i = 0; i < clazzCount; i++ ){
			data.add( new ClazzTestData( i,  attributeCount, relationCount, manipulationCount  ) );
		}
		
		return data;
	}
	
	private ClazzTestData( int clazzNumber, int attributeCount, int relationCount, int manipulationCount ){
		setTestClazzes( clazzNumber, attributeCount, relationCount, manipulationCount );
	}
	
	private void setTestClazzes( int number, int attributeCount, int relationCount, int manipulationCount ){
		
		testClazz = new HashMap<String,String>();
		testClazz.put("name",  "TestClazzName-" + number );
		testClazz.put("description",  "TestClazzDescription-" + number );
		
		for( int i=0; i<attributeCount; i++ ){
			Map<String,String> testAttribute = new HashMap<String,String>();
			testAttribute.put("name",  "TestAttributeName-" + number );
			testAttribute.put("description",  "TestAttributeDescription-" + number );
			testAttributes.add( testAttribute );
		}
		
	}

	Map<String, String> getTestClazz() {
		return testClazz;
	}

	List<Map<String, String>> getTestAttributes() {
		return testAttributes;
	}

	List<Map<String, String>> getTestRelations() {
		return testRelations;
	}
	
}
